package exception;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by 5406160@qq.com on LiBoWen 李博闻.
 *
 * @ClassName : ExceptionDemo3
 * @Author : 54061
 * @Date: 2022/2/11 18:58
 */
public class ExceptionDemo3 {
    public static void main(String[] args) {
        System.out.println("main开始");
        try{
            //System.out.println(8 / 0);
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

            String strTime = "1990-01-01";

            Date date = sdf.parse(strTime);

            System.out.println("date = " + date);
        }catch (Exception e){
            System.out.println("异常产生了~");
        }
        System.out.println("main结束");
    }
}
